package com.alibaba.algo.cooperation.feign.vo.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;

import java.util.List;

@Data
@ApiModel
public class GetRoleUserReqVO {

    @ApiModelProperty(value = "角色id",dataType = "Long" )
    private Long roleId;

    @ApiModelProperty(value = "角色code")
    private String roleCode;

    @ApiModelProperty(value = "角色id列表",dataType = "Long" )
    private List<Long> roleIdList;

    @ApiModelProperty(value = "角色code列表",dataType = "String" )
    private List<String> roleCodeList;

    //角色id集合范围下的人员模糊匹配条件
    private String searchKey;

    @ApiModelProperty(value = "逻辑删除", dataType = "String", notes = "空字符串或Null获取全量数据，N-只获取有效数据")
    private String isDeleted;
    /**
     * 判空
     *
     * @return
     */
    public boolean empty() {
        return roleId == null & ObjectUtils.isEmpty(roleCode)
                & CollectionUtils.isEmpty(roleIdList) & CollectionUtils.isEmpty(roleCodeList);
    }
}
